package peng.service.impl;

import org.springframework.stereotype.Service;
import peng.dao.AdminUserMenuMapper;
import peng.entity.AdminUserMenu;
import peng.service.AdminUserMenuService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminUserMenuServiceImpl implements AdminUserMenuService {
    @Resource
    private AdminUserMenuMapper adminUserMenuMapper;

    /**
     * 权限列表
     * @return
     */
    @Override
    public List<AdminUserMenu> listmens() {
        return adminUserMenuMapper.listmens();
    }

    /**
     * 删除
     * @param id
     * @return
     */
    @Override
    public int deleteByPrimaryKey(Integer id) {

        return adminUserMenuMapper.deleteByPrimaryKey(id);
    }

    /**
     * 添加
     * @param record
     * @return
     */

    @Override
    public int insertSelective(AdminUserMenu record) {

        return adminUserMenuMapper.insertSelective(record);
    }

    /**
     * 根据id查询菜单信息
     * @param id
     * @return
     */
    @Override
    public AdminUserMenu selectByPrimaryKey(Integer id) {

        return adminUserMenuMapper.selectByPrimaryKey(id);
    }

    /**
     * 修改
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKeySelective(AdminUserMenu record) {

        return adminUserMenuMapper.updateByPrimaryKeySelective(record);
    }
}
